package com.visitcqut.service.impl;


import com.visitcqut.domain.Admin;
import com.visitcqut.mapper.AdminMapper;
import com.visitcqut.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @program: visitcqut
 * @description: 管理员服务实现类
 * @author: ATAO
 * @create: 2020-11-13 13:40
 **/

@Repository
public class AdminServiceImpl implements AdminService {


    /**
     * 数据库访问层
     */
    @Autowired
    AdminMapper adminMapper;


    @Override
    public int insert(Admin data) {
        return 0;
    }

    @Override
    public int delete(Integer id) {
        return 0;
    }


    /**
     * 管理员帐户密码修改
     * @param data
     * @return int
     */
    public int update(Admin data) {
        return adminMapper.update(data);
    }

    @Override
    public Admin findById(Integer id) {
        return null;
    }


    @Override
    public List<Admin> findAll() {
        return null;
    }


    /**
     * 管理员登陆时验证帐户密码的准确性
     * @param admin
     * @return int
     */
    @Override
    public Admin loginVerification(Admin admin) {
        return adminMapper.loginVerification(admin);
    }

}
